<template>
  <div>
    <div class="g-cur">
      <div class="wp">
        <NuxtLink to="/" class="a">首页</NuxtLink><span> / </span> <NuxtLink to="/question"
          class="a">全部问题</NuxtLink><span> / </span><span class="s">常见问题详情</span>
      </div>
    </div>
  
    <div class="m-details">
      <div class="wp" v-html="info.answer">
       
      </div>
    </div>
  </div>
</template>
<script setup>

import { reactive, ref, onMounted } from 'vue';
import request from '~/services/request'
import { RouterLink, RouterView, useRouter } from 'vue-router'
const router = useRouter()
const route = useRoute()
const id = route.query.id
const ask= route.query.ask
const info=ref({})
onMounted(()=>{
  let params={
    
  }
  if(id){
    params.id=id
    request.get_issues_id(params).then(res=>{
      info.value=res
    })
  }
  if(ask){
    params.q=ask
    request.get_issues(params).then(res=>{
      info.value=res.results[0]
    })
  }
})
</script>

<style>

</style>
